from collections import UserDict,defaultdict


class MyDict(UserDict):
    def __setitem__(self, key, value):
        super().__setitem__(key, value*2)


if __name__ == '__main__':
    test = MyDict(one=1)
    # test["one"] = 1
    print(test)
    test1 = defaultdict(dict)
    value = test1["leo"]
    print(test1)